VERSION 2.00
Begin Form getfile 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Double
   Caption         =   "SELECT FILE"
   ForeColor       =   &H00000080&
   Height          =   3615
   Left            =   3615
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3210
   ScaleWidth      =   5160
   Top             =   2835
   Width           =   5280
   Begin CommandButton Ok 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Ok"
      Height          =   735
      Left            =   3960
      TabIndex        =   8
      Top             =   360
      Width           =   1095
   End
   Begin TextBox Choose 
      FontBold        =   -1  'True
      FontItalic      =   0   'False
      FontName        =   "Arial Rounded MT Bold"
      FontSize        =   9
      FontStrikethru  =   0   'False
      FontUnderline   =   0   'False
      Height          =   375
      Left            =   120
      TabIndex        =   7
      Top             =   2640
      Width           =   4935
   End
   Begin PictureBox Picture1 
      BorderStyle     =   0  'None
      Height          =   2892
      Left            =   120
      ScaleHeight     =   2895
      ScaleWidth      =   3735
      TabIndex        =   1
      Top             =   120
      Width           =   3732
      Begin TextBox txtSearchSpec 
         Height          =   285
         Left            =   2040
         TabIndex        =   5
         Text            =   "*.hex"
         Top             =   2040
         Width           =   1575
      End
      Begin FileListBox filList 
         Height          =   2175
         Left            =   0
         TabIndex        =   4
         Top             =   240
         Width           =   1815
      End
      Begin DirListBox dirList 
         Height          =   1380
         Left            =   2040
         TabIndex        =   3
         Top             =   480
         Width           =   1575
      End
      Begin DriveListBox drvList 
         Height          =   315
         Left            =   2040
         TabIndex        =   2
         Top             =   0
         Width           =   1575
      End
      Begin Label lblCriteria 
         Caption         =   "Search &Criteria:"
         Height          =   255
         Left            =   0
         TabIndex        =   6
         Top             =   0
         Width           =   1335
      End
   End
   Begin CommandButton Close 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Cancel"
      Height          =   720
      Left            =   3960
      TabIndex        =   0
      Top             =   1560
      Width           =   1080
   End
End
Option Explicit
Dim fullfile
Dim infile
Dim choosefile
Const CM = 44
Const CR = 13
Const CL = 59
Const LF = 10

Sub Close_Click ()
Unload getfile
End Sub

Sub DirList_Change ()
    fillist.Path = dirlist.Path
    choose = dirlist.Path
End Sub

Sub DirList_LostFocus ()
    dirlist.Path = dirlist.List(dirlist.ListIndex)
End Sub

Sub DrvList_Change ()
   On Error GoTo DriveHandler
    dirlist.Path = drvList.Drive
    Exit Sub
DriveHandler:
    drvList.Drive = dirlist.Path
    Exit Sub
End Sub

Sub filList_Click ()
choose = dirlist.Path & "\" & fillist
End Sub

Sub Form_Load ()
fillist.Pattern = txtSearchSpec.Text
End Sub

Sub Ok_Click ()
hexy.hexfile.Text = choose.Text
Unload getfile
End Sub

Sub txtSearchSpec_Change ()
fillist.Pattern = txtSearchSpec.Text
End Sub

Sub txtSearchSpec_GotFocus ()
    txtSearchSpec.SelStart = 0
    txtSearchSpec.SelLength = Len(txtSearchSpec.Text)
End Sub

